
<% if not @events.empty? %>


<% @events.each do |e| %>
	<div id="event_<%= e.id %>" class="row-block">
		<%= link_to_remote "#{e.formatted_date}", :url => { :action => 'event_changed', :id => e.id }  %> | 
		<%= link_to (image_tag 'zoom_16x16.gif', :size => '14x14', :border => 0, :title => 'open this event'), :action => 'show', :id => e.id %> | 
		<%= link_to_remote "X", :url => { :action => 'delete_event', :id => e.id }, :confirm => 'Are you sure you want to delete this event forever? This will also delete all associated instances, meetings & attendance records. Consider your choice, my young padawan.' %>
		<br>
		<div id="message-black">
			<%= e.event_type.name %>
		</div>
		<% if e.has_attendances? %>
		<%= link_to "stats", :controller => 'events', :action => 'stats', :id => e.id %> | 
		<% end %>
		<%= link_to 'mark', :action => 'mark', :id => e.id %> | 
		<%= link_to (image_tag 'calculator_edit.png', :size => '14x14', :border => 0, :title => 'edit head counts'), :action => 'edit_counts', :id => e.id %>
		<% if e.head_count['head_count'].to_i > 0 %>
		| 
		<%= link_to (image_tag 'calculator.png', :size => '14x14', :border => 0, :title => 'view head counts'), :action => 'show_counts', :id => e.id %>
		<% end %>
	</div>
<% end %>

<% else %>
<div id="message">
	There are no events.
</div>
<% end %>